<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html>
<head>
<!-- Copyright 1997 The Open Group, All Rights Reserved -->
<title>gencat</title>
</head><body bgcolor=white>
<center>
<font size=2>
The Single UNIX &reg; Specification, Version 2<br>
Copyright &copy; 1997 The Open Group

</font></center><hr size=2 noshade>
<h4><a name = "tag_001_014_814">&nbsp;</a>NAME</h4><blockquote>
gencat - generate a formatted message catalogue
</blockquote><h4><a name = "tag_001_014_815">&nbsp;</a>SYNOPSIS</h4><blockquote>
<pre><code>

gencat <i>catfile msgfile</i>... 
</code>
</pre>
</blockquote><h4><a name = "tag_001_014_816">&nbsp;</a>DESCRIPTION</h4><blockquote>
The
<i>gencat</i>
utility
merges the message text source files
<i>msgfile</i>
into a formatted message catalogue
<i>catfile</i>.
The file
<i>catfile</i>
will be created if it does not already exist.
If
<i>catfile</i>
does exist,
its messages will be included in the new
<i>catfile</i>.
If set and message numbers collide,
the new message text defined in
<i>msgfile</i>
will replace the old message text currently contained in
<i>catfile</i>.
</blockquote><h4><a name = "tag_001_014_817">&nbsp;</a>OPTIONS</h4><blockquote>
None.
</blockquote><h4><a name = "tag_001_014_818">&nbsp;</a>OPERANDS</h4><blockquote>
The following operands are supported:
<dl compact>

<dt><i>catfile</i><dd>A pathname of the formatted message catalogue.
If "-" is specified, standard output is used.
The format of the message catalogue produced is unspecified.

<dt><i>msgfile</i><dd>A pathname of a message text source file.
If "-" is specified for an instance of
<i>msgfile</i>,
standard input is used.
The format of message text source files is defined in the
EXTENDED DESCRIPTION section.

</dl>
</blockquote><h4><a name = "tag_001_014_819">&nbsp;</a>STDIN</h4><blockquote>
The standard input is not used unless a
<i>msgfile</i>
operand is specified as "-".
</blockquote><h4><a name = "tag_001_014_820">&nbsp;</a>INPUT FILES</h4><blockquote>
The input files are text files.
</blockquote><h4><a name = "tag_001_014_821">&nbsp;</a>ENVIRONMENT VARIABLES</h4><blockquote>
The following environment variables affect the execution of
<i>gencat</i>:
<dl compact>

<dt><i>LANG</i><dd>Provide a default value for the internationalisation variables
that are unset or null.
If
<i>LANG</i>
is unset or null, the corresponding value from the
implementation-dependent default locale will be used.
If any of the internationalisation variables contains an invalid setting, the
utility will behave as if none of the variables had been defined.

<dt><i>LC_ALL</i><dd>
If set to a non-empty string value,
override the values of all the other internationalisation variables.

<dt><i>LC_CTYPE</i><dd>
Determine the
locale for the interpretation of sequences of bytes of text data as
characters (for example, single- as opposed to multi-byte characters
in arguments and input files).

<dt><i>LC_MESSAGES</i><dd>
Determine the locale that should be used to affect
the format and contents of diagnostic
messages written to standard error.

<dt><i>NLSPATH</i><dd>
Determine the location of message catalogues
for the processing of
<i>LC_MESSAGES .
</i>
</dl>
</blockquote><h4><a name = "tag_001_014_822">&nbsp;</a>ASYNCHRONOUS EVENTS</h4><blockquote>
Default.
</blockquote><h4><a name = "tag_001_014_823">&nbsp;</a>STDOUT</h4><blockquote>
The standard output is not used unless the
<i>catfile</i>
operand is specified as -.
</blockquote><h4><a name = "tag_001_014_824">&nbsp;</a>STDERR</h4><blockquote>
Used only for diagnostic messages.
</blockquote><h4><a name = "tag_001_014_825">&nbsp;</a>OUTPUT FILES</h4><blockquote>
None.
</blockquote><h4><a name = "tag_001_014_826">&nbsp;</a>EXTENDED DESCRIPTION</h4><blockquote>
The format of a message text source file is defined as follows.
Note that the fields of a message text source line are separated
by a single
blank
character.
Any other
blank characters
are considered as being part
of the subsequent field.
<dl compact>

<dt><b>$set&nbsp;&nbsp;</b><i>n&nbsp;comment</i><dd>
This line specifies the set identifier of the
following messages until the next
<b>$set</b>
or end-of-file appears.
The
<i>n</i>
denotes the set identifier, which
is defined as a number in the range [1,
{NL_SETMAX}]
(see the <b>XSH</b> specification,
<i><a href="../xsh/limits.h.html">&lt;limits.h&gt;</a></i>).
Set identifiers
must be presented in ascending order
within a single source file but need not be contiguous.
Any string following the set identifier is treated as a comment.
If no
<b>$set</b>
directive is specified in a message text source file, all messages
will be located in an
implementation-dependent default message set
NL_SETD
(see the <b>XSH</b> specification,
<i><a href="../xsh/nl_types.h.html">&lt;nl_types.h&gt;</a></i>).

<dt><b>$delset&nbsp;&nbsp;</b><i>n&nbsp;comment</i><dd>
This line deletes message set
<i>n</i>
from an
existing message catalogue.
The
<i>n</i>
denotes the set number [1,
{NL_SETMAX}].
Any string following the set number is treated as a comment.

<dt><b>$&nbsp;</b><i>comment</i><dd>
A line beginning with "$" followed by a blank
character is treated as a comment.

<dt><i>m&nbsp;message-text</i><dd>
The
<i>m</i>
denotes the message identifier,
which is defined as a number in the range [1,
{NL_MSGMAX}]
(see the <b>XSH</b> specification,
<i><a href="../xsh/limits.h.html">&lt;limits.h&gt;</a></i>).
The
<i>message-text</i>
is stored in the message catalogue
with the set identifier
specified by the last
<b>$set</b>
directive, and with message identifier
<i>m</i>.
If the
<i>message-text</i>
is empty,
and a
blank character
field separator is present, an empty string is
stored in the message catalogue.
If a message source line has a
message number, but neither a field separator nor
<i>message-text</i>,
the existing message with that number (if any) is deleted from the
catalogue.
Message identifiers must be in ascending
order within a single set, but need not be contiguous.
The length of
<i>message-text</i>
must be in the range [0,
{NL_TEXTMAX}]
(see the <b>XSH</b> specification,
<i><a href="../xsh/limits.h.html">&lt;limits.h&gt;</a></i>).

<dt><b>$quote&nbsp;&nbsp;</b><i>n</i><dd>
This line specifies an optional quote character
<i>c</i>,
which can be used to surround
<i>message-text</i>
so that trailing spaces or null (empty) messages are visible in a
message source line.
By default, or if an empty
<b>$quote</b>
directive is supplied, no quoting of
<i>message-text</i>
will be recognised.

</dl>
<p>
Empty lines in a message text source file are ignored.
The effects of lines starting with any character other than those
defined above are implementation-dependent.
<p>
Text strings can contain the special characters and
escape sequences defined in the following table:
<p><table  bordercolor=#000000 border=1 align=center><tr valign=top><th align=center><b>Description</b>
<th align=center><b>Symbol</b>
<th align=center><b>Sequence</b>
<tr valign=top><td align=left>newline
<td align=left>NL(LF)
<td align=left>\n
<tr valign=top><td align=left>horizontal tab
<td align=left>HT
<td align=left>\t
<tr valign=top><td align=left>vertical-tab
<td align=left>VT
<td align=left>\v
<tr valign=top><td align=left>backspace
<td align=left>BS
<td align=left>\b
<tr valign=top><td align=left>carriage-return
<td align=left>CR
<td align=left>\r
<tr valign=top><td align=left>form-feed
<td align=left>FF
<td align=left>\f
<tr valign=top><td align=left>backslash
<td align=left>\
<td align=left>\\
<tr valign=top><td align=left>bit pattern
<td align=left><i>ddd</i>
<td align=left>\<i>ddd</i>
</table>
<p>
The escape sequence
<i>\ddd</i>
consists of backslash followed by one, two or three octal digits,
which are taken to specify the value of the desired character.
If the character following a backslash is not one of those specified,
the backslash is ignored.
<p>
Backslash (\) followed by a
newline
character is also used
to continue a string on the following line.
Thus, the following two lines describe a single message string:
<pre>
<code>
1 This line continues \
to the next line
</code>
</pre>
which is equivalent to:
<pre>
<code>
1 This line continues to the next line
</code>
</pre>
</blockquote><h4><a name = "tag_001_014_827">&nbsp;</a>EXIT STATUS</h4><blockquote>
The following exit values are returned:
<dl compact>

<dt>0<dd>Successful completion.

<dt>&gt;0<dd>An error occurred.

</dl>
</blockquote><h4><a name = "tag_001_014_828">&nbsp;</a>CONSEQUENCES OF ERRORS</h4><blockquote>
Default.
</blockquote><h4><a name = "tag_001_014_829">&nbsp;</a>APPLICATION USAGE</h4><blockquote>
Message catalogues produced by
<i>gencat</i>
are binary encoded, meaning
that their portability cannot be guaranteed
between different types of machine.
Thus, just as C programs need to be recompiled for each type of
machine, so message catalogues must be recreated via
<i>gencat</i>.
</blockquote><h4><a name = "tag_001_014_830">&nbsp;</a>EXAMPLES</h4><blockquote>
None.
</blockquote><h4><a name = "tag_001_014_831">&nbsp;</a>FUTURE DIRECTIONS</h4><blockquote>
None.
</blockquote><h4><a name = "tag_001_014_832">&nbsp;</a>SEE ALSO</h4><blockquote>
<i><a href="iconv.html">iconv</a></i>,
the <b>XSH</b> specification description of
<i><a href="../xsh/limits.h.html">&lt;limits.h&gt;</a></i>.
<br>
</blockquote><hr size=2 noshade>
<center><font size=2>
UNIX &reg; is a registered Trademark of The Open Group.<br>
Copyright &copy; 1997 The Open Group
<br> [ <a href="../index.html">Main Index</a> | <a href="../xshix.html">XSH</a> | <a href="../xcuix.html">XCU</a> | <a href="../xbdix.html">XBD</a> | <a href="../cursesix.html">XCURSES</a> | <a href="../xnsix.html">XNS</a> ]

</font></center><hr size=2 noshade>
</body></html>
